package com.lpz.wdbc;

import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
import java.util.List;

import javax.sql.DataSource;

import org.springframework.jdbc.core.JdbcTemplate;

/**
 * 
 * @author Administrator
 * @date 2017年5月4日
 */
public class DBContext {
    
    private Class<?> clazz;
    
//    private 
    
    private JdbcTemplate jdbcOperator;
    
    DBContext(DataSource  ds){
        this.jdbcOperator = new JdbcTemplate(ds);
    }
    
    
    
    
    public List<?> getList(String sql, List<Object> params){
        List<?> data =  new ArrayList<>();
//        jdbcOperator.query(sql, params.toArray(), rowMapper);
        
        return data;
    }
    
    
    public int update(Object entity){
//        jdbcOperator.query(sql, params.toArray(), rowMapper);
//        jdbcOperator.up
        
        return 0;
    }
}
